POV-Ray : Newsgroups : povray.advanced-users : vturbulence in functions? : Re: vturbulence in functions? Server Time
29 Jul 2024 12:25:29 EDT (-0400)
  Re: vturbulence in functions?  
From: Rune
Date: 28 Mar 2002 19:55:40
Message: <3ca3bb8c@news.povray.org>
"Christopher James Huff" wrote:
> Turbulence is based on 3D noise. Just use 3 calls
> to f_noise3d(), each with a random offset.

As I said, this will give an uneven distribution. The range of the noise
will have the shape of a box rather than a sphere.

> Use more noise3d() calls at different scales.

Yes, yes, I know, but this is way too slow. It also doesn't solve the
problem above. I don't understand why turbulence is not directly available
in functions somehow. A special warp function would be an obvious addition
to the existing pigment function and transform function, which all return
vectors.

> You might try and see if you can get the right result by
> using the function as a pattern and turbulating the
> pattern, then using the pattern as a function.

> function {pattern {function {FUNCTION} turbulence...}}

I make use of more than the default x y z values in functions. How do I pass
on those from the outer function to the inner function when there's a
pattern wrapper in the way?

> You could also do this to use those values in addition to the
> unturbulated values in a separate function:
>
> #declare turb_x = function {pattern {function {x} turbulence...}}
> #declare turb_y = function {pattern {function {y} turbulence...}}
> #declare turb_z = function {pattern {function {z} turbulence...}}
>
> The distance turbulence pushes a point (the output of the vturbulence()
> function) would be: < turb_x(x) - x, turb_y(y) - y, turb_z(z) - z>

Except that the pattern wrapper will mod the x, y, and z function to cycle
in the 0 to 1 range.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:  http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Ring:  http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.